<template>
  <hc-button type="primary" @click="open = true">Begin Tour</hc-button>

  <hc-divider />

  <hc-space>
    <hc-button ref="ref1">Upload</hc-button>
    <hc-button ref="ref2" type="primary">Save</hc-button>
    <hc-button ref="ref3" :icon="MoreFilled" />
  </hc-space>

  <hc-tour
    v-model="open"
    :mask="{
      style: {
        boxShadow: 'inset 0 0 15px #333',
      },
      color: 'rgba(80, 255, 255, .4)',
    }"
  >
    <hc-tour-step :target="ref1?.$el" title="Upload File">
      <img src="https://hicor-ui.org/images/hicor-ui-logo.svg" alt="tour.png" />
      <div>Put you files here.</div>
    </hc-tour-step>
    <hc-tour-step
      :target="ref2?.$el"
      title="Save"
      description="Save your changes"
      :mask="{
        style: {
          boxShadow: 'inset 0 0 15px #fff',
        },
        color: 'rgba(40, 0, 255, .4)',
      }"
    />
    <hc-tour-step
      :target="ref3?.$el"
      title="Other Actions"
      description="Click to see other"
      :mask="false"
    />
  </hc-tour>
</template>

<script setup lang="ts">
import { ref } from 'vue'
import { MoreFilled } from '@hicor-ui/icons-vue'
import type { ButtonInstance } from 'hicor-ui'

const ref1 = ref<ButtonInstance>()
const ref2 = ref<ButtonInstance>()
const ref3 = ref<ButtonInstance>()

const open = ref(false)
</script>
